import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/home/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/chat/index.vue'),
    },
    {
      path: '/file',
      name: 'file',
      component: () => import('../views/WebWorker/FileView.vue'),
    },
    {
      path: '/newfile',
      name: 'newfile',
      component: () => import('../views/FileView/index.vue'),
    },
    {
      path: '/swiper',
      name: 'swiper',
      component: () => import('../views/swiper/index.vue'),
    },
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // route.ts.hbs
    // -- append route here --
    {
      path: '/scale',
      component: () => import('@/views/Scale/index.vue'),
      meta: { title: 'scale' },
    },

    {
      path: '/attrs',
      component: () => import('@/views/Attrs/index.vue'),
      meta: { title: 'attrs' },
    },

    {
      path: '/TestGit4',
      component: () => import('@/views/TestGit4/index.vue'),
      meta: { title: 'TestGit4' },
    },

    {
      path: '/TestGit3',
      component: () => import('@/views/TestGit3/index.vue'),
      meta: { title: 'TestGit3' },
    },

    {
      path: '/TestGit2',
      component: () => import('@/views/TestGit2/index.vue'),
      meta: { title: 'TestGit2' },
    },

    {
      path: '/TestGit',
      component: () => import('@/views/TestGit/index.vue'),
      meta: { title: 'TestGit' },
    },

    {
      path: '/FormSchema',
      component: () => import('@/views/FormSchema/index.vue'),
      meta: { title: 'FormSchema' },
    },

    {
      path: '/WebWorker',
      component: () => import('@/views/WebWorker/index.vue'),
      meta: { title: 'WebWorker' },
    },

    {
      path: '/resume',
      component: () => import('@/views/Resume/index.vue'),
      meta: { title: 'resume' },
    },

    {
      path: '/wxLogin',
      component: () => import('@/views/WxLogin/index.vue'),
      meta: { title: 'wxLogin' },
    },

    {
      path: '/ThirdLogin',
      component: () => import('@/views/ThirdLogin/index.vue'),
      meta: { title: 'ThirdLogin' },
    },

    {
      path: '/FileOss',
      component: () => import('@/views/FileOss/index.vue'),
      meta: { title: 'FileOss' },
    },

    {
      path: '/Test',
      component: () => import('@/views/Test/index.vue'),
      meta: { title: 'Test' },
    },
    {
      path: '/i18nView',
      component: () => import('@/views/i18nView/index.vue'),
      meta: { title: 'i18nView' },
    },
  ],
})

export default router
